import Vue from 'vue'
import App from './App.vue'
import router from './router';
import store from './store/index';
import {Form, FormItem, Input,Carousel,
  Button,Select,Option,Message ,
  CarouselItem,Row,Col,Menu,MenuItem,Submenu,MenuItemGroup,Container,Main,Header,Aside,Upload,Dialog} from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css'
import axios from 'axios'
axios.defaults.baseURL = "http://localhost:8081/";
axios.interceptors.request.use(config => {
  config.headers.Authorization = window.sessionStorage.getItem('token');
  return config
})
// axios.interceptors.response.use(config => {
//   // NProgress.done()
//   return config
// }) 

Vue.use(Form)
Vue.use(FormItem)
Vue.use(Input)
Vue.use(Carousel)
Vue.use(CarouselItem)
Vue.use(Row)
Vue.use(Col)
Vue.use(MenuItem)
Vue.use(Menu)
Vue.use(Submenu)
Vue.use(MenuItemGroup)
Vue.use(Container)
Vue.use(Main)
Vue.use(Header)
Vue.use(Aside)
Vue.use(Upload)
Vue.use(Dialog)
Vue.use(Button)
Vue.use(Select)
Vue.use(Option)



Vue.prototype.$http = axios;
Vue.prototype.$message = Message;
Vue.config.productionTip = false;





new Vue({
  router,
  store,
  render: h => h(App),
  beforeCreate(){
    Vue.prototype.$bus = this
  }
}).$mount('#app')
